import { FC } from 'react';
import style from '../FilterCheckBox/FilterCheckBox.module.scss';
import { Checkbox } from 'antd';
import { TFilterCheckBox } from '@/components/shared/Filters/types';

// TODO custom active background

const FilterCheckBox:FC<TFilterCheckBox> = ({
  text,
  value,
  endAdornment,
  onCheckedChange,
  checked,
  name,
}) => {

  return (
    <div className={style.checkbox}>
      <Checkbox
        onCheckedChange={onCheckedChange}
        checked={checked}
        value={value}
        id={value}
      />
      <p>
        {text}
      </p>
      {endAdornment}
    </div>
  );
};

export default FilterCheckBox;
